]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't use symbolic icon at full size for system actions
authorSebastian Keller <skeller@gnome.org>
Mon, 22 Mar 2021 00:50:25 +0000 (01:50 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 29 Apr 2021 09:42:40 +0000 (09:42 +0000)
When attempting to account for scaling in e65e5ede the icon_size of the
StIcon was set to the target size, overriding the icon-size set in the
'system-action-icon' CSS, which was only half the size. The intent of
that commit however was not to scale up the symbolic icon, but the
circle around it. Do this by manually applying the scaling factor.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3940

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1777>

js/ui/appDisplay.js

index 2cfd2cd032c4c583457a762b03fc9219b86b2699..b926aab98b8de3a62e37edf5a7297264d63dd21c 100644 (file)
@@ -1855,6 +1855,7 @@ var AppSearchProvider = class AppSearchProvider {
     }
 
     getResultMetas(apps, callback) {
+        const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
         let metas = [];
         for (let id of apps) {
             if (id.endsWith('.desktop')) {
@@ -1871,7 +1872,8 @@ var AppSearchProvider = class AppSearchProvider {
 
                 const createIcon = size => new St.Icon({
                     icon_name: iconName,
-                    icon_size: size,
+                    width: size * scaleFactor,
+                    height: size * scaleFactor,
                     style_class: 'system-action-icon',
                 });